<?php
ini_set('display_errors',1);
set_time_limit(0);
include_once  dirname(dirname(dirname(__FILE__))).'/mgtv_v2/mgtv_init.php';
define('ORG_ID', 'shanghai_mobile');
include_once dirname(dirname(dirname(__FILE__))) . '/mgtv_v2/'.ORG_ID.'/init.php';
include_once  dirname(dirname(dirname(__FILE__))).'/mgtv_v2/'.ORG_ID.'/define.php';
include_once  dirname(dirname(dirname(__FILE__))).'/mgtv_v2/'.ORG_ID.'/models/child_c2_task_model.php';
$ip = i_get_ip();
i_write_log_core('notify from ' . $ip, ORG_ID . '/c2/notify');
$postdata = file_get_contents("php://input");//接受postdata
if(empty($postdata)){
	i_write_log_core('notify data is empty ' . $ip, ORG_ID . '/c2/notify');	
	die;
}
$postdata = json_decode($postdata,true);
i_write_log_core('notify data ' . var_export($postdata,true), ORG_ID . '/c2/notify');


//$c2_notify = array('nns_id' => $CorrelateID, 'nns_notify_result_url' => $ResultFileURL, 'nns_notify_result' => $CmdResult,);

if(is_array($postdata)){
	child_c2_task_model::save_c2_notify($postdata);
}
?>